Optimal. Leaf size=43 \[ \frac {\sin (a+x (b-d)-c)}{2 (b-d)}+\frac {\sin (a+x (b+d)+c)}{2 (b+d)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {4570, 2637} \[ \frac {\sin (a+x (b-d)-c)}{2 (b-d)}+\frac {\sin (a+x (b+d)+c)}{2 (b+d)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2637
Rule 4570
Rubi steps
\begin {align*} \int \cos (a+b x) \cos (c+d x) \, dx &=\int \left (\frac {1}{2} \cos (a-c+(b-d) x)+\frac {1}{2} \cos (a+c+(b+d) x)\right ) \, dx\\ &=\frac {1}{2} \int \cos (a-c+(b-d) x) \, dx+\frac {1}{2} \int \cos (a+c+(b+d) x) \, dx\\ &=\frac {\sin (a-c+(b-d) x)}{2 (b-d)}+\frac {\sin (a+c+(b+d) x)}{2 (b+d)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.18, size = 43, normalized size = 1.00 \[ \frac {\sin (a+x (b-d)-c)}{2 (b-d)}+\frac {\sin (a+x (b+d)+c)}{2 (b+d)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.45, size = 42, normalized size = 0.98 \[ \frac {b \cos \left (d x + c\right ) \sin \left (b x + a\right ) - d \cos \left (b x + a\right ) \sin \left (d x + c\right )}{b^{2} - d^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.82, size = 40, normalized size = 0.93 \[ \frac {\sin \left (b x + d x + a + c\right )}{2 \, {\left (b + d\right )}} + \frac {\sin \left (b x - d x + a - c\right )}{2 \, {\left (b - d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.66, size = 40, normalized size = 0.93 \[ \frac {\sin \left (a -c +\left (b -d \right ) x \right )}{2 b -2 d}+\frac {\sin \left (a +c +\left (b +d \right ) x \right )}{2 b +2 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.33, size = 40, normalized size = 0.93 \[ \frac {\sin \left (b x + d x + a + c\right )}{2 \, {\left (b + d\right )}} - \frac {\sin \left (-b x + d x - a + c\right )}{2 \, {\left (b - d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.30, size = 84, normalized size = 1.95 \[ \frac {b\,\left (\frac {\sin \left (a+c+b\,x+d\,x\right )}{2}+\frac {\sin \left (a-c+b\,x-d\,x\right )}{2}\right )}{b^2-d^2}-\frac {d\,\left (\frac {\sin \left (a+c+b\,x+d\,x\right )}{2}-\frac {\sin \left (a-c+b\,x-d\,x\right )}{2}\right )}{b^2-d^2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.48, size = 153, normalized size = 3.56 \[ \begin {cases} x \cos {\relax (a )} \cos {\relax (c )} & \text {for}\: b = 0 \wedge d = 0 \\- \frac {x \sin {\left (a - d x \right )} \sin {\left (c + d x \right )}}{2} + \frac {x \cos {\left (a - d x \right )} \cos {\left (c + d x \right )}}{2} - \frac {\sin {\left (a - d x \right )} \cos {\left (c + d x \right )}}{2 d} & \text {for}\: b = - d \\\frac {x \sin {\left (a + d x \right )} \sin {\left (c + d x \right )}}{2} + \frac {x \cos {\left (a + d x \right )} \cos {\left (c + d x \right )}}{2} + \frac {\sin {\left (c + d x \right )} \cos {\left (a + d x \right )}}{2 d} & \text {for}\: b = d \\\frac {b \sin {\left (a + b x \right )} \cos {\left (c + d x \right )}}{b^{2} - d^{2}} - \frac {d \sin {\left (c + d x \right )} \cos {\left (a + b x \right )}}{b^{2} - d^{2}} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________